import fasttext

# 训练模型
model = fasttext.train_supervised(input="training_data.txt", epoch=25, dim=32, lr=1)

# 保存模型
model.save_model("model_filename.ftz")

out = model.test('training_data.txt')
print(out)

